package server.to;

public class UpdateTo {

	private int updatePoolSeqNo;
	private String directoryPath;
	private String updateDate;
	
	public UpdateTo() {
		super();
	}
	public UpdateTo(String directoryPath, String updateDate) {
		super();
		this.directoryPath = directoryPath;
		this.updateDate = updateDate;
	}
	public UpdateTo(int updatePoolSeqNo, String directoryPath, String updateDate) {
		super();
		this.updatePoolSeqNo = updatePoolSeqNo;
		this.directoryPath = directoryPath;
		this.updateDate = updateDate;
	}
	
	public int getUpdatePoolSeqNo() {
		return updatePoolSeqNo;
	}
	public void setUpdatePoolSeqNo(int updatePoolSeqNo) {
		this.updatePoolSeqNo = updatePoolSeqNo;
	}
	public String getDirectoryPath() {
		return directoryPath;
	}
	public void setDirectoryPath(String directoryPath) {
		this.directoryPath = directoryPath;
	}
	public String getUpdateDate() {
		return updateDate;
	}
	public void setUpdateDate(String updateDate) {
		this.updateDate = updateDate;
	}
	
	@Override
	public String toString() {
		return "UpdateTo [updatePoolSeqNo=" + updatePoolSeqNo
				+ ", directoryPath=" + directoryPath + ", updateDate="
				+ updateDate + "]";
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((directoryPath == null) ? 0 : directoryPath.hashCode());
		result = prime * result
				+ ((updateDate == null) ? 0 : updateDate.hashCode());
		result = prime * result + updatePoolSeqNo;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		UpdateTo other = (UpdateTo) obj;
		if (directoryPath == null) {
			if (other.directoryPath != null)
				return false;
		} else if (!directoryPath.equals(other.directoryPath))
			return false;
		if (updateDate == null) {
			if (other.updateDate != null)
				return false;
		} else if (!updateDate.equals(other.updateDate))
			return false;
		if (updatePoolSeqNo != other.updatePoolSeqNo)
			return false;
		return true;
	}
	
}
